package cn.edu.scau.cmi.chenyuanying.abstractFactoryMethod;

import cn.edu.scau.cmi.chenyuanying.simpleFactoryMethod.Beef;
import cn.edu.scau.cmi.chenyuanying.simpleFactoryMethod.Chicken;
import cn.edu.scau.cmi.chenyuanying.simpleFactoryMethod.Pork;

public abstract class Brand {
	public abstract String showBrandName();
	public abstract Beef getBeefObj();
	public abstract Chicken getChickenObj();
	public abstract Pork getPorkObj();
	
	public static Brand getFactory(String option) {
		Brand factory = null;
		if(option.compareTo("Wins") == 0) {
			factory = new Wins();
		} else if(option.compareTo("Tianbang") == 0) {
			factory = new Tianbang();
		} else {
			factory = new Aonong();
		}
		return factory;
	}
}
